use async_graphql::{InputObject, SimpleObject};
use linera_sdk::linera_base_types::{AccountOwner, Amount};
use serde::{Deserialize, Serialize};

use rfq::TokenPair;

#[derive(Clone, Debug, Serialize, Deserialize, SimpleObject, InputObject)]
pub struct QuoteRequested {
    pub(crate) token_pair: TokenPair,
    pub(crate) amount: Amount,
}

#[derive(Clone, Debug, Serialize, Deserialize, SimpleObject, InputObject)]
pub struct QuoteProvided {
    pub(crate) token_pair: TokenPair,
    pub(crate) amount: Amount,
    pub(crate) amount_offered: Amount,
    pub(crate) quoter_owner: AccountOwner,
}

#[allow(dead_code)]
impl QuoteProvided {
    pub fn get_quoter_owner(&self) -> AccountOwner {
        self.quoter_owner
    }

    pub fn get_amount(&self) -> Amount {
        self.amount
    }
}
